<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:body>
        <div class="change_pass">
            <h3 style="color: #3F8AAC; margin: 5px 0 0 5px;">List Interviews</h3>
            <f:view>
                <h:form>
                    <h:dataTable style="text-align: center;" columnClasses="bd_td1,bd_td,bd_td,bd_td,bd_td,bd_td,bd_td,bd_td" cellpadding="3" cellspacing="1" border="0" styleClass="joblist" rowClasses="list_footer_cell" headerClass="list_header_cell" value="#{interviewsManagedBean.findAllInterviews()}" var="item">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Name"/>
                            </f:facet>                        
                            <h:commandLink action="#{interviewsManagedBean.showInterviewsDetails(item)}" value="#{item.employees.empName}" >
                                <f:setPropertyActionListener value="#{item}" target="#{interviewsManagedBean.inter}"  />
                            </h:commandLink>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Title Vacancy"/>
                            </f:facet>
                            <h:outputText value="#{item.vacances.vacantyTitle}" />
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Applicants Name"/>
                            </f:facet>
                            <h:outputText  value="#{item.applicants.applicantName}" />
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="ScheduleDate"/>
                            </f:facet>
                            <p:inplace>
                                <p:inputText style="color: #000;" size="8" value="#{item.scheduleDate}">
                                    <f:convertDateTime pattern="MM/dd/yyyy" />
                                </p:inputText>
                            </p:inplace>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Attached Date"/>
                            </f:facet>
                            <p:inplace>
                                <p:inputText style="color: #000;" size="8" value="#{item.attachedDate}">
                                    <f:convertDateTime pattern="MM/dd/yyyy" />
                                </p:inputText>
                            </p:inplace>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="StartTime"/>
                            </f:facet>
                            <p:inplace>
                                <p:inputText style="color: #000;" size="10" value="#{item.startTime}" />
                            </p:inplace>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="EndTime"/>
                            </f:facet>
                            <p:inplace>
                                <p:inputText style="color: #000;" size="10" value="#{item.endTime}" />
                            </p:inplace>
                        </h:column>
                        <h:column >
                            <f:facet name="header">
                                <h:outputText value="Status"/>
                            </f:facet>
                            <h:selectOneMenu value="#{item.inStatus}">
                                <f:selectItem itemLabel="---Select---" itemValue="0" ></f:selectItem>
                                <f:selectItem itemLabel="Selected" itemValue="2"></f:selectItem>
                                <f:selectItem itemLabel="Rejected" itemValue="3"></f:selectItem>
                            </h:selectOneMenu>
                        </h:column>
                    </h:dataTable>
                    <table>
                        <tr>
                            <td style="text-align: left;">

                                <h:commandButton value="Save" action="#{interviewsManagedBean.updateInterview}" />
                            </td>
                        </tr>
                    </table>
                </h:form>
            </f:view>
        </div>

    </h:body>
</html>

